//##########################################################################
//#                                                                        #
//#                                PCV                                     #
//#                                                                        #
//#  This program is free software; you can redistribute it and/or modify  #
//#  it under the terms of the GNU Library General Public License as       #
//#  published by the Free Software Foundation; version 2 of the License.  #
//#                                                                        #
//#  This program is distributed in the hope that it will be useful,       #
//#  but WITHOUT ANY WARRANTY; without even the implied warranty of        #
//#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         #
//#  GNU General Public License for more details.                          #
//#                                                                        #
//#          COPYRIGHT: EDF R&D / TELECOM ParisTech (ENST-TSI)             #
//#                                                                        #
//##########################################################################
//
//*********************** Last revision of this file ***********************
//$Author::                                                                $
//$Rev::                                                                   $
//$LastChangedDate::                                                       $
//**************************************************************************
//

#ifndef MESH_ILLUMINATION_HEADER
#define MESH_ILLUMINATION_HEADER

#include <GenericCloud.h>
#include <GenericMesh.h>
#include <GenericIndexedMesh.h>
#include <GenericProgressCallback.h>

//! PCV (Portion de Ciel Visible) algorithm
/** "Ambiant Illumination" in english!
**/
class PCV
{
public:

	//! Simulates global illumination on a cloud (or a mesh) with OpenGL
	/** Computes per-vertex illumination intensity as a scalar field.
		\return number of 'light' directions computed (or -1 if an error occured)
	**/
	static int Launch(unsigned numberOfRays,
							CCLib::GenericCloud* vertices,
							CCLib::GenericMesh* mesh=0,
							bool meshIsClosed=false,
							unsigned width=1024,
							unsigned height=1024,
							bool mode360=true,
							CCLib::GenericProgressCallback* progressCb=0);
};

#endif
